import request  from '@/utils/request';

import { BASE_URL } from '@/config/query';

export async function queryChargingErrorPage(params = { pageNum: 1 }) {
  return request(`${BASE_URL}/device_charging/error/page`, params)
}

// 报警统计
export async function alarmCountStatistics(params) {
  return request(`${BASE_URL}/statistics_device_alarm/alarm_count_statistics`, params)
}

// 充电桩统计明细
export async function chargingStatistics() {
  return request(`${BASE_URL}/device_charging/statistics`)
}

// 异常断电明细-断电原因分页
export async function queryRecordPage(params) {
  return request(`${BASE_URL}/device_charging/error/detail/page`, params)
}

// 充电口使用状态分页
export async function queryUsePage(params) {
  return request(`${BASE_URL}/device_charging/port/page`, params)
}

// 充电桩统计柱状图
export async function queryChargingBar(params) {
  return request(`${BASE_URL}/device_charging/statistics/bar`, params)
}